package com.ruoyi.financial.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.financial.mapper.FDetainOrderMapper;
import com.ruoyi.financial.domain.FDetainOrder;
import com.ruoyi.financial.service.IFDetainOrderService;

/**
 * 收单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-07
 */
@Service
public class FDetainOrderServiceImpl implements IFDetainOrderService 
{
    @Autowired
    private FDetainOrderMapper fDetainOrderMapper;

    /**
     * 查询收单
     * 
     * @param id 收单主键
     * @return 收单
     */
    @Override
    public FDetainOrder selectFDetainOrderById(Long id)
    {
        return fDetainOrderMapper.selectFDetainOrderById(id);
    }

    /**
     * 查询收单列表
     * 
     * @param fDetainOrder 收单
     * @return 收单
     */
    @Override
    public List<FDetainOrder> selectFDetainOrderList(FDetainOrder fDetainOrder)
    {
        return fDetainOrderMapper.selectFDetainOrderList(fDetainOrder);
    }

    /**
     * 新增收单
     * 
     * @param fDetainOrder 收单
     * @return 结果
     */
    @Override
    public int insertFDetainOrder(FDetainOrder fDetainOrder)
    {
        fDetainOrder.setCreateTime(DateUtils.getNowDate());
        return fDetainOrderMapper.insertFDetainOrder(fDetainOrder);
    }

    /**
     * 修改收单
     * 
     * @param fDetainOrder 收单
     * @return 结果
     */
    @Override
    public int updateFDetainOrder(FDetainOrder fDetainOrder)
    {
        fDetainOrder.setUpdateTime(DateUtils.getNowDate());
        return fDetainOrderMapper.updateFDetainOrder(fDetainOrder);
    }

    /**
     * 批量删除收单
     * 
     * @param ids 需要删除的收单主键
     * @return 结果
     */
    @Override
    public int deleteFDetainOrderByIds(Long[] ids)
    {
        return fDetainOrderMapper.deleteFDetainOrderByIds(ids);
    }

    /**
     * 删除收单信息
     * 
     * @param id 收单主键
     * @return 结果
     */
    @Override
    public int deleteFDetainOrderById(Long id)
    {
        return fDetainOrderMapper.deleteFDetainOrderById(id);
    }
}
